import request from '@/utils/request'

// 查询商品类目，列表
export function getCategoryList(params) {
  return request({
    url: '/pms/category/list',
    method: 'get',
    params
  })
}
// 查询父商品类目，列表
export function getParentCategory(params) {
  return request({
    url: '/pms/category/parentList',
    method: 'get',
    params
  })
}

// 查询商品类目，详细
export function getCategory(id) {
  return request({
    url: '/pms/category/' + id,
    method: 'get',
  })
}

export function getSubCategory(pid) {
  return request({
    url: '/pms/category/SubCategory/' + pid,
    method: 'get',
  })
}